<% manager = ::OpenProject::Avatars::AvatarManager %>
<% html_title l(:label_administration), 'Openproject Avatars' %>

<fieldset class="form--fieldset">
  <legend class="form--fieldset-legend" title="<%= t 'avatars.label_gravatar'  %>"><%= t 'avatars.label_gravatar'  %></legend>

  <div class="form--field">
    <%= styled_label_tag 'settings-enable-gravatars', t('avatars.settings.enable_gravatars') %>
    <%= hidden_field_tag  'settings[enable_gravatars]', 0 %>
    <div class="form--field-container">
      <%= styled_check_box_tag 'settings[enable_gravatars]', 1, manager.gravatar_enabled?, container_class: '-xslim', id: 'settings-enable-gravatars' %>
    </div>
  </div>
</fieldset>

<fieldset class="form--fieldset">
  <legend class="form--fieldset-legend" title="<%= t 'avatars.label_local_avatar'  %>"><%= t 'avatars.label_local_avatar'  %></legend>
  <div class="form--field">
    <%= styled_label_tag 'settings-enable-local-avatars', t('avatars.settings.enable_local_avatars')  %>
    <%= hidden_field_tag  'settings[enable_local_avatars]', 0 %>
    <div class="form--field-container">
      <%= styled_check_box_tag 'settings[enable_local_avatars]', 1, manager.local_avatars_enabled?, container_class: '-xslim', id: 'settings-enable-local-avatars' %>
    </div>
  </div>
</fieldset>
